package Operation;

import Book.BookDao;

import java.util.Scanner;

public class DelOperation implements IOperation {
    @Override
    public void work() {
        System.out.println ("删除书籍");
        Scanner scanner=new Scanner(System.in);
        System.out.println ("请输入要删除的id ：");
        int bookid=scanner.nextInt ();
        BookDao bookDao=new BookDao ();
        boolean ret=bookDao.delete(bookid);
        if(ret){
            System.out.println ("删除成功");
        }else {
            System.out.println ("删除失败");
        }
    }
}
